Crate spl_token_2022

Source
Expand description

An ERC20-like Token program for the Miraland blockchain

Re-exports§

pub use miraland_program;
pub use miraland_zk_token_sdk;

Modules§

error
Error types
extension
Extensions available to token mints and accounts
generic_token_account
Generic Token Account, copied from spl_token::state
instruction
Instruction types
native_mint
The Mint that represents the native token
offchain
Offchain helper for fetching required accounts to build instructions
onchain
On-chain program invoke helper to perform on-chain transfer_checked with correct accounts
pod
Rewrites of the base state types represented as Pods
pod_instruction
Rewrites of the instruction data types represented as Pods
processor
Program state processor
proof
Helper for processing instruction data from ZK Token proof program
state
State transition types

Constants§

ID
The const program ID.

Functions§

amount_to_ui_amount
Convert a raw amount to its UI representation (using the decimals field defined in its mint)
amount_to_ui_amount_string
Convert a raw amount to its UI representation (using the decimals field defined in its mint)
amount_to_ui_amount_string_trimmed
Convert a raw amount to its UI representation using the given decimals field Excess zeroes or unneeded decimal point are trimmed.
check_id
Returns true if given pubkey is the program ID.
check_program_account
Checks that the supplied program ID is correct for solarti-token-2022
check_spl_token_program_account
Checks that the supplied program ID is corect for solarti-token or solarti-token-2022
check_system_program_account
Checks if the spplied program ID is that of the system program
check_zk_token_proof_program_account
Checks that the supplied program ID is correct for the ZK Token proof program
id
Returns the program ID.
try_ui_amount_into_amount
Try to convert a UI representation of a token amount to its raw amount using the given decimals field
ui_amount_to_amount
Convert the UI representation of a token amount (using the decimals field defined in its mint) to the raw amount